Skip to content

lib.sh: Set ALSA settings from a state file#1294

Merged
lgirdwood merged 7 commits intothesofproject:mainfrom
golowanow:alsa_state_20250807
Aug 19, 2025
Merged

lib.sh: Set ALSA settings from a state file#1294
lgirdwood merged 7 commits intothesofproject:mainfrom
golowanow:alsa_state_20250807

Conversation

@golowanow
Copy link
Copy Markdown
Member

@golowanow golowanow commented Aug 8, 2025

This PR is to continue with #1284 and PoC #1270


Set ALSA settings from a state file and migrate PTL configurations to the new mechanism:

  1. set_alsa_settings() function now uses alsactl restore command, to change ALSA controls from a custom state file first, if it is present, and next - execute a bash script with amixer commands, if it is also present.
    The state file is expected as ./alsa_settings/${PLATFORM}.state whereas the bash script remains as ./alsa_settings/${PLATFORM}.sh
    The custom state should be compatible with the platform's default state, see set_alsa() function.

  2. Replace PTL platform ALSA settings done as bash script commands by their equivalent ALSA state files for:

  • PTLH_HDA_AIOC
  • PTLH_SDW_RT712
  • PTLP_RVP_SDW
  • MTLP_RVP_HDA
  • MTLP_SDW_AIOC
  • MTLP_RVP_SDW
  • LNLM_RVP_HDA
  • LNLM_SDW_AIOC

The parameters in the state files are explicitly set even if the default values at the appropriate DUT are currently the same.

  1. Log difference between the current ALSA state and the restored ALSA state.

  2. Add README.md documentation for the SOF test ALSA settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement The issue or pull request improves already existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants